<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class BlockType extends Model
{
    protected $fillable = ['name','sort'];

    //该类型下所有的区块
    public function blocks()
    {
        return $this->hasMany('App\Models\Block');
    }

    //获取所有数据
    public static function Lists()
    {
        return self::orderBy('sort','desc')->get();
    }

}
